
JavaArt Chapter 6. Steganography

From the website:

  Killer Game Programming in Java
  http://fivedots.coe.psu.ac.th/~ad/jg

  Dr. Andrew Davison
  Dept. of Computer Engineering
  Prince of Songkla University
  Hat yai, Songkhla 90112, Thailand
  E-mail: ad@fivedots.coe.psu.ac.th


If you use this code, please mention my name, and include a link
to the website.

Thanks,
  Andrew

============================

This directory contains 6 Java programs.

   * HideText.java
          - this calls one of the steganography classes
            to hide text inside an image

   * RevealText.java
          - this calls one of the steganography classes
            to extract text hidden inside an image

   * Steganography.java            // 4 steganography classes
   * StegCrypt.java
   * MultiStegCrypt.java
   * FragMultiStegCrypt.java


There are 2 subdirectories:
  * examps\     -- text files for use in testing
  * images\     -- PNG files for use in testing


There are 2 batch files:
  * compile.bat
  * run.bat
     - they assume that Jasypt is in c:\jasypt-1.5\

----------------------------
Compilation:

> compile *.java

----------------------------
Execution:

The HideText and RevealText classes take an integer argument which
specifies which steganography class they should use:

    0 == Steganography class
    1 == StegCrypt class
    2 == MultiStegCrypt class
    3 == FragMultiStegCrypt class


1) Hiding Text:

Usage:
> run HideText <steg type number> <text file> <PNG file>

e.g.

> run HideText 0 examps\Comparison.java images\waterlilies.png

         - use Steganography class (0) to hide the text in
           examps\Comparison.java inside the image images\waterlilies.png,
           saving the modified image in images\waterliliesMsg.png


> run HideText 3 examps\Painter.java images\bigCat.png

         - use FragMultiStegCrypt class (3) to hide the text in
           examps\Painter.java inside the image images\bigCat.png,
           saving the modified image in images\bigCatMsg.png

---------
2) Extracting Text:

Usage:
> run RevealText <steg type number> <PNG file>

e.g

> run RevealText 0 images\waterliliesMsg.png

         - use Steganography class (0) to extract the text from
           images\waterliliesMsg.png, saving it in images\waterliliesMsg.txt


> run RevealText 3 images\bigCatMsg.png

         - use FragMultiStegCrypt class (3) to extract the text from
           images\bigCatMsg.png, saving it in images\bigCatMsg.txt


----------------------------
Jasypt Installation

Download Jasypt v.1.5 from http://www.jasypt.org/
(jasypt-1.5-dist.zip; 2.4 MB), unzip it,
and store jasypt-1.5\ in a convenient location (e.g. c:\jasypt-1.5\).

---------
Last updated: 6th June 2009
